package net.lzzy;

import java.util.HashSet;
import java.util.Set;

public class TestHashSet{
    public static void main(String[] args) {
        // Create a hash set
        Set<String> set = new HashSet<>();
        // Add strings to the set
        set.add("London");
        set.add("Paris") ;
        set.add("New York");
        set.add("San Francisco");
        set.add("Beijing");
        set.add("New York");
        System.out.println(set) ;
        // DispLay the eLements in the hash set
        for (String s: set) {
            System.out.print(s.toUpperCase() + " ");}
        // Process the eLements using a forEach method
        System.out.println();
        set. forEach(e -> System.out.print(e. toLowerCase() + " "));
    }}
